import { colorReinforce } from './colorReinforce'
import type { TRequestConfig } from './data'

// 加固请求
const requestReinforce = <T = any>(config: TRequestConfig): Promise<T> => {
  return colorReinforce<T>(config, true)
}

// 非加固请求
const request = <T = any>(config: TRequestConfig): Promise<T> => {
  return colorReinforce<T>(config, false)
}

export { request, requestReinforce }
